cmake_minimum_required(VERSION 3.10)

set(TARGET_NAME "test")
set(CMAKE_CXX_STANDARD 17)

file(GLOB_RECURSE TARGET_HEADER "*.hpp")
file(GLOB_RECURSE TARGET_SOURCE "*.cpp")

add_executable(${TARGET_NAME} ${TARGET_HEADER} ${TARGET_SOURCE})

# OpenCV
find_package(OpenCV REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${OpenCV_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} PUBLIC ${OpenCV_LIBRARIES})

#===================================
# 添加自定义模块
#===================================

target_include_directories(${TARGET_NAME} PUBLIC "../Moduels")

# 串口模块
target_link_libraries(${TARGET_NAME} PUBLIC "SerialPort")
target_link_libraries(${TARGET_NAME} PUBLIC "SerialPortUtilities")

# UI模块
target_link_libraries(${TARGET_NAME} PUBLIC "Windows")